package mskim.study.ooad.ch01_06;

public class GuitarSpec extends InstrumentSpec {
	private int numStrings;

	public GuitarSpec(Builder builder, String model, Type type, Wood backWood,
			Wood topWood, int numStrings) {
		super(builder, model, type, backWood, topWood);
		this.numStrings = numStrings;
	}

	public int getNumStrings() {
		return numStrings;
	}

	@Override
	public boolean matchs(InstrumentSpec otherSpec) {
		if (! super.matchs(otherSpec)) 
			return false;
		if (! (otherSpec instanceof GuitarSpec)) 
			return false;
		GuitarSpec spec = (GuitarSpec) otherSpec;
		if (numStrings!=spec.getNumStrings())
			return false;
		return true;
	}

	
}
